package com.qzsoft.zhjd.server.modules.luzhong.exp.controller;


import com.qzsoft.zhjd.server.common.utils.R;
import com.qzsoft.zhjd.server.modules.luzhong.exp.entity.RuanHuaDianEntity;
import com.qzsoft.zhjd.server.modules.luzhong.exp.service.RuanHuaDianService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能描述:软化点
 * @author : liugf
 * @date : 2021/4/16 19:30
 */
@Slf4j
@RestController
@RequestMapping("luzhong/exp/ruanhuadian")
public class RuanHuaDianController {

    @Autowired
    private RuanHuaDianService  ruanHuaDianService;

    /**
     * 功能描述:接受延伸度试验数据
     * @param entity 延伸度试验实体
     * @return : cn.qzsoft.collect.server.common.utils.R
     * @author : liugf
     * @date : 2021/4/16 9:16
     */
    @PostMapping("save")
    public R save(@RequestBody RuanHuaDianEntity entity){
        log.info("软化点试验："+entity.toString());
        if(ruanHuaDianService.saveOrUpdate(entity)){
            return R.ok();
        }else{
            return R.error("软化点试验接受成功");
        }
    }

}
